{extend name="layout"}
{block name="detail"}
<header class="aui-header-default aui-header-fixed aui-header-bg">
    <a href="javascript:history.back(-1)" class="aui-header-item" style="visibility:hidden;">
        <i class="aui-icon aui-icon-back-white"></i>
    </a>
    <div class="aui-header-center aui-header-center-clear">
        <div class="aui-header-center-logo">
            <div class="aui-car-white-Typeface">我的货架</div>
        </div>
    </div>
    <a href="#" class="aui-header-item-icon" style="min-width:0;visibility:hidden;">
        <i class="aui-icon aui-icon-share-pd"></i>
    </a>
</header>
<style>
    .ssss img{max-width:100%;}
</style>
<div class="aui-content-box" style="padding-top:44px;">
    <section class="aui-list-product" style="margin-top: 10px;">
        <div class="aui-list-product-box">
            {volist name="products" id="product"}
            <div style="padding: 10px;margin-bottom: 10px; border: 1px solid #e7e7e7;background-color: #fafafa">
                <a href="{:url('index/shop/product_dtl')}?id={$product.id}&sid={$shop.id}">
                    <img src="{$product.img}" style="width: 100%">
                    <div class="aui-list-product-item-text">
                        <h3>{$product.title}</h3>
                        <div class="aui-list-product-mes-box">
                            <div style="color: #EB5211">
                                {volist name="guige[$key]" id="gg"}
                                <div>
                                    <span style="margin-right: 10px;">规格：{$gg.guige}</span>
                                    <span style="margin-right: 10px;">卖价：<em>¥</em>{$gg.salePrice}</span>
                                    <span >代理价：<em>¥</em>{$gg.agentPrice}</span>
                                </div>
                                {/volist}
                            </div>
                        </div>
                    </div>
                </a>
                {if condition="$product.uid eq $uid"}
                <div class="text-center">
                    <a href="{:url('index/shop/upProduct')}?id={$product.id}" class="btn btn-danger">修改</a>
                    {if condition="$product.isShow eq 1"}
                    <a href="{:url('index/shop/sxjProduct')}?id={$product.id}&v=0" class="btn btn-warning">下架</a>
                    {else}
                    <a href="{:url('index/shop/sxjProduct')}?id={$product.id}&v=1" class="btn btn-success">上架</a>
                    {/if}
                </div>
                {else}
                <div class="text-center">
                    <a href="{:url('index/shop/cancelAgent')}?id={$product.id}" class="btn btn-danger">取消代理</a>
                </div>
                {/if}
            </div>
            {/volist}
        </div>
    </section>
</div>
<div style="height:100px;"></div>
{/block}